﻿@{
    ViewBag.Title = "Register";
}


<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>全局金服</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <link rel="shortcut icon" href="/favicon.ico">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.5.8/css/sm.min.css">
    <link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.5.8/css/sm-extend.min.css">

 
</head>
<body>
    <!-- 你的html代码 -->
    <script type='text/javascript' src='//g.alicdn.com/sj/lib/zepto/zepto.min.js' charset='utf-8'></script>
    <script type='text/javascript' src='//g.alicdn.com/msui/sm/0.5.8/js/sm.min.js' charset='utf-8'></script>
    <script type='text/javascript' src='//g.alicdn.com/msui/sm/0.5.8/js/sm-extend.min.js' charset='utf-8'></script>
        <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script> 
    <script src="~/Scripts/lhgdialog/lhgdialog.js"></script>
    <header class="bar bar-nav">
        <h1 class='title'>注册</h1>
    </header>
    @using (Ajax.BeginForm("Register", new AjaxOptions() { OnSuccess = "OnSuccess" }))
    {
        <div class="content">
            <div class="list-block">
                <ul>
                    <!-- Text inputs -->
                       
                    <li>
                        <div class="item-content">
                            <div class="item-media"><i class="icon icon-form-tel"></i></div>
                            <div class="item-inner">
                                <div class="item-title label">手机</div>
                                <div class="item-input">
                                    <input type="tel" placeholder="请输入手机号码" id="phone" name="phone">
                                </div>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="item-content">
                            <div class="item-media"><i class="icon icon-form-password"></i></div>
                            <div class="item-inner">
                                <div class="item-title label">密码</div>
                                <div class="item-input">
                                    <input type="password" placeholder="请输入密码" name="pwd" id="pwd" class="">
                                </div>
                            </div>
                        </div>
                    </li>

                </ul>
            </div>
            <div class="content-block">
                <div class="row">

                    <div class="col-100">
                        <input type="submit" value="注册" class="button button-big button-fill button-success" />
                    </div>
                </div>
            </div>
        </div>
  
    }
    <script>
     
        function OnSuccess(e) { 
            if (e == "-3") {
                $.dialog.alert('请输入手机号', '错误!'); 
            } else if (e == "-2") { 
                $.dialog.alert('请输入合法的手机号码', '错误!');
            } else if (e == "-1") {
                $.dialog.alert('请输入密码', '错误!');
            } else {
                if (e.status == 1) {
                    $.dialog.alert('恭喜你获得500积分,可以用于活动抽奖和投资抵扣', function () { 
                        window.close();
                    }); 
                } else {
                    $.dialog.alert(e.message);
                    return false;
                } 
            }
        }
    </script>


</body>
</html>



